<template>
	<view class="main-content ">
		<image class="img" :src="baseImgUrl+'home/not-data.png'" mode=""></image>
		<view class="status">审核中</view>
		<view class="msg">{{msg}}</view>
	</view>
</template>

<script>
	import {
		baseUrl,
		baseImgUrl
	} from '@/config'
	import Apply from '@/api/apply.js'
	export default {
		data() {
			return {
				baseImgUrl,
				msg: '审核通过后系统会自动分配订单给您，请耐心等待',
			}
		},
		onLoad(e) {
			console.log(e);
			this.msg = e.msg || '审核通过后系统会自动分配订单给您，请耐心等待';
			uni.setNavigationBarTitle({
			    title: e.title || '师傅入驻'
			});
		},
		async onPullDownRefresh() {
			let res = await Apply.engineerStatus()
			if (res.code == 200) {
				wx.stopPullDownRefresh();
				// 0未申请 1审核中 2通过 3未通过
				if (res.data) {
					if (res.data.auditType == 2) {
						let url = uni.getStorageSync('toUrl')
						uni.navigateTo({
							url
						})
					} else if (res.data.auditType == 3) {
						uni.navigateBack(-1)
					}
				}
			}
		  },
		methods: {
		}
	}
</script>

<style scoped lang="scss">
	.main-content {
		width: 100%;
		height: 100%;
		padding: 20rpx 30rpx;
		background: #F6F8FA;
		text-align: center;
		padding-top: 200rpx;
		.img {
			width: 356rpx;
			height: 356rpx;
		}
		.status {
			font-size: 32rpx;
			color: $main-font-black;
			font-weight: bold;
			margin-top: 40rpx;
			margin-bottom: 20rpx;
		}
		.msg {
			color: $main-font-auxiliary;
			font-size: 24rpx;
		}
	}
	
</style>